﻿@using LSEntity
@using OralExamBLL
@model OralExamEntity.OETeacher.Index
@{
    ViewBag.Title = "TeacherIndex";
}
@section scripts
{
    @Scripts.Render("~/bundles/blockUI")
    @Scripts.Render("~/bundles/WdatePicker")
    <script type="text/javascript">
        $(function () {
            $("#btnSetClassClose").click($.unblockUI);
            $("span[id='btnSetClass']").click(function () {
                getSetClass();
                $("#TestId").val($(this).attr("TestId"));
                $("#TestType").val($(this).attr("Creator"));
                var url = "/@OEWebConfig.Area/Teacher/GetClassSet";
                $.get(url, { TestId: $(this).attr("TestId") }, function (result) {
                    $("#UserTime").val(result.UserTime);
                    $("#BeginTime").val(result.BeginTime);
                    $("#PassWord").val(result.PassWord);
                    $("#ClassId").val(result.ClassId);
                }, "json");
            });
            var setClassOption = {
                iframe: true,
                beforeSubmit: function () {

                },
                success: function (result) {
                    alert(result.Msg);
                },
                dataType: 'json'
            };
            $('#formSetClass').submit(function () {
                $(this).ajaxSubmit(setClassOption);
                return false;
            });
        });
        var getSetClass = function () {
            $.blockUI({
                message: $('#rqSetClass'),
                css: {
                    top: '30%',
                    left: '50%',
                    textAlign: 'left',
                    marginLeft: '-320px',
                    marginTop: '-145px',
                    background: 'none'
                }
            });
        };
    </script>
}
@section styles
{
    @Styles.Render("~/Content/idialog")
    <style type="text/css">
        #btnSetClass
        {
            cursor: pointer;
        }
    </style>
}
@Html.Partial(Model.ViewPath + "Teacher_Set_Class.cshtml", new TestClassEntity())
@Html.Partial(Model.ViewPath + "head.cshtml")
@Html.Partial(Model.ViewPath + "Teacher_Index.cshtml")
@Html.Partial(Model.ViewPath + "feet.cshtml")
